package com.jing.yao.modules.user.controller.dto;

import com.jing.yao.annotation.Formatter;
import com.jing.yao.component.dto.YaoBaseDTO;

import java.io.Serializable;
import java.util.List;

/**
 * 用户DTO
 *
 * @author lirui
 * @since 2020-06-13
 */
public class UserDTO extends YaoBaseDTO implements Serializable {
    /**
     * 用户名
     */
    private String username;

    /**
     * 别名即真实姓名
     */
    private String nickname;

    private String oldPassword;

    private String newPassword;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 电话
     */
    private String phone;

    /**
     * 是否有效
     */
    @Formatter(dictCode = "enabled", targetField = "enabledStr")
    private Integer enabled;


    /**
     * 账号密码过期
     * false:过期，true:未过期
     */
    private Integer accountNonExpired;

    /**
     * 密码是否未过期
     * false:过期，true:未过期
     */
    private Integer credentialsNonExpired;

    /**
     * 账号是否未锁定
     * false:锁定，true:未锁定
     */
    @Formatter(dictCode = "yes_no", targetField = "accountLockedStr")
    private Integer accountLocked;

    /**
     * 账号是否未锁定,前端显示
     */
    private String accountLockedStr;

    /**
     * 角色
     */
    private List<String> roleCodes;


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getOldPassword() {
        return oldPassword;
    }

    public void setOldPassword(String oldPassword) {
        this.oldPassword = oldPassword;
    }

    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public List<String> getRoleCodes() {
        return roleCodes;
    }

    public void setRoleCodes(List<String> roleCodes) {
        this.roleCodes = roleCodes;
    }

    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    public Integer getAccountNonExpired() {
        return accountNonExpired;
    }

    public void setAccountNonExpired(Integer accountNonExpired) {
        this.accountNonExpired = accountNonExpired;
    }

    public Integer getCredentialsNonExpired() {
        return credentialsNonExpired;
    }

    public void setCredentialsNonExpired(Integer credentialsNonExpired) {
        this.credentialsNonExpired = credentialsNonExpired;
    }

    public Integer getAccountLocked() {
        return accountLocked;
    }

    public void setAccountLocked(Integer accountLocked) {
        this.accountLocked = accountLocked;
    }

    public String getAccountLockedStr() {
        return accountLockedStr;
    }

    public void setAccountLockedStr(String accountLockedStr) {
        this.accountLockedStr = accountLockedStr;
    }
}

